package net.cyan.proteus.execute.logic;

import net.cyan.proteus.*;
import net.cyan.proteus.base.logic.ContinueStatement;
import net.cyan.proteus.execute.*;

/**
 * ContinueExecutor
 * @author camel
 * @date 2008-6-28
 */
public class ContinueExecutor implements LogicStatementExecutor<ContinueStatement>
{
    public ContinueExecutor()
    {
    }

    public int execute(ContinueStatement statement, TemplateContext context, TemplateExecutor executor,
                       Template template) throws Exception
    {
        return context.getBoolean(statement.getExpression()) ? CONTINUE : NEXT;
    }
}
